package jp.co.ricoh.melody.utils;

import android.support.design.BuildConfig;
import android.util.Log;

/**
 * Copyright (C) 2016 RICOH Co.,LTD.
 * All rights reserved.
 */
public class LogUtils {
    public static final int LOG_LEVEL = BuildConfig.DEBUG ? Log.VERBOSE : Log.INFO;

    public static void v(String tag, String text) {
        if (Log.VERBOSE >= LOG_LEVEL) {
            Log.v(tag, text);
        }
    }

    public static void d(String tag, String text) {
        if (Log.DEBUG >= LOG_LEVEL) {
            Log.d(tag, text);
        }
    }

    public static void i(String tag, String text) {
        if (Log.INFO >= LOG_LEVEL) {
            Log.i(tag, text);
        }
    }

    public static void w(String tag, String text) {
        if (Log.WARN >= LOG_LEVEL) {
            Log.w(tag, text);
        }
    }

    public static void e(String tag, String text) {
        if (Log.ERROR >= LOG_LEVEL) {
            Log.e(tag, text);
        }
    }
}
